<?php global $base_url?>
<!-- #header -->
<?php hkfanr_cms_over_ad();?>
<div id="header">
	<!-- #header-inside -->
    <div id="header-inside" class="container_12 clearfix">
    	<!-- #header-inside-left -->
        <div id="header-inside-left" class="grid_1">
            <a href="<?php print check_url($front_page); ?>" title="<?php print t('Home'); ?>"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a>
        </div><!-- EOF: #header-inside-left -->
        <div id="header-inside-middle" class="grid_7">
            <div id="navigation" class="clearfix">
            <?php 
            $main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu')); 
            print drupal_render($main_menu_tree);
            ?>
            </div>
        </div><!-- EOF: #header-inside-middle -->
        <!-- #header-inside-right -->    
        <div id="header-inside-right" class="grid_3">
            <?php print render($page['search_area']); ?>
        </div><!-- EOF: #header-inside-right -->
        <div id="header-inside-end" class="grid_2">
            <?php hkfanr_cms_user_menu_alter();?>
        </div><!-- EOF: #header-inside-end -->
    </div><!-- EOF: #header-inside -->
</div><!-- EOF: #header -->
<!-- #content -->
<div id="content">
    <!-- #content-inside -->
    <div id="content-inside" class="container_12 clearfix">
        <div id="main" class="grid_8">
            <?php if ($messages): ?>
            <div id="console" class="clearfix">
            <?php print $messages; ?>
            </div>
            <?php endif; ?>
            <?php 
            $term = field_view_field('node', $node, 'field_category', array('default'));
            $node_author = user_load($node->uid);
            print '<div class="page_title_box"><span class="page_title">'.$title.'</span></div>';
            if($tabs){
                print render($tabs);
            }
            print render($page['content']);
            ?>
        </div>
        <div id="sidebar-second" class="grid_4">
            <?php print render($page['sidebar_second']); ?>
        </div><!-- EOF: #sidebar-second -->
    </div><!-- EOF: #content-inside -->

</div><!-- EOF: #content -->

<!-- #footer -->    
<div id="footer">
	<!-- #footer-inside -->
    <div id="footer-inside" class="container_12 clearfix">
        <div class="powered-by">
            @ 2014 HKfanr
        </div>
        <div class="footer-area grid_7">
            <ul class="footer-menu-1">
                <?php hkfanr_cms_footer_menu(1);?>
            </ul>
        </div><!-- EOF: .footer-area -->
        <div class="footer-area grid_4">
            <ul class="footer-menu-2">
                <?php hkfanr_cms_footer_menu(2);?>
            </ul>
        </div><!-- EOF: .footer-area -->
    </div><!-- EOF: #footer-inside -->

</div><!-- EOF: #footer -->
